Between continuous variables: Pearson
Between a binary and a continuous variable: Mann-Whitney
Between binary variables: Chi-square
Response variable = vit D
Explanatory variables = bmi, lat, alt
Only using data of women 20-49 (no BMI data for > 60)
##
## Call:
## lm(formula = vitD ~ scale(BMI) + scale(Lat) + scale(Altitude),
## data = df_20_50)
##
## Residuals:
## Min 1Q Median 3Q Max
## -49.186 -11.162 -1.078 9.929 78.566
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 61.1982 0.3383 180.921 <2e-16 ***
## scale(BMI) -2.9808 0.3408 -8.746 <2e-16 ***
## scale(Lat) -3.8711 0.3432 -11.279 <2e-16 ***
## scale(Altitude) -5.6014 0.3474 -16.124 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.56 on 2393 degrees of freedom
## (741 observations deleted due to missingness)
## Multiple R-squared: 0.1371, Adjusted R-squared: 0.136
## F-statistic: 126.7 on 3 and 2393 DF, p-value: < 2.2e-16
Response variable = vit D
Explanatory variables = lat, alt
Using all data (ages 20 - > 60)
##
## Call:
## lm(formula = vitD ~ scale(Lat) + scale(Altitude), data = df_20_60)
##
## Residuals:
## Min 1Q Median 3Q Max
## -58.880 -11.834 -1.393 10.236 129.025
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 61.6521 0.3072 200.68 <2e-16 ***
## scale(Lat) -3.8095 0.3122 -12.20 <2e-16 ***
## scale(Altitude) -5.4344 0.3122 -17.41 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.46 on 3227 degrees of freedom
## Multiple R-squared: 0.1076, Adjusted R-squared: 0.107
## F-statistic: 194.5 on 2 and 3227 DF, p-value: < 2.2e-16
Using only women 20-49 dataset
Response variable = vit D
Explanatory variables = Altitude and Latitude
The coefficient value (column "Estimate") represents the mean change of deaths/ht given a one-unit shift in the independent variable
##
## Call:
## lm(formula = mean_vitD ~ Alt + Lat, data = df_mun)
##
## Residuals:
## Min 1Q Median 3Q Max
## -16.9712 -3.9240 0.3683 3.4497 18.8023
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 87.9558348 2.8874294 30.462 < 2e-16 ***
## Alt -0.0065317 0.0005223 -12.506 < 2e-16 ***
## Lat -0.9283350 0.1233005 -7.529 4.88e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.612 on 146 degrees of freedom
## Multiple R-squared: 0.551, Adjusted R-squared: 0.5449
## F-statistic: 89.59 on 2 and 146 DF, p-value: < 2.2e-16
The coefficient value (column "Estimate") represents the mean change of deaths/ht given a one-std-deviation shift in the independent variable (indicates which variable has a bigger effect on deaths/ht).
##
## Call:
## lm(formula = mean_vitD ~ scale(Alt) + scale(Lat), data = df_mun)
##
## Residuals:
## Min 1Q Median 3Q Max
## -16.9712 -3.9240 0.3683 3.4497 18.8023
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 61.3983 0.4597 133.558 < 2e-16 ***
## scale(Alt) -5.9286 0.4741 -12.506 < 2e-16 ***
## scale(Lat) -3.5692 0.4741 -7.529 4.88e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.612 on 146 degrees of freedom
## Multiple R-squared: 0.551, Adjusted R-squared: 0.5449
## F-statistic: 89.59 on 2 and 146 DF, p-value: < 2.2e-16
Confirms collinearity in the model. VIF = 1 is best. VIF > 5 means problematic variable (correlated with other(s))
## Alt Lat
## 1.06 1.06
Response variable = Deaths per 100,000
Explanatory variables = Altitude and Latitude
##
## Call:
## lm(formula = Deaths_ht ~ Alt + Lat, data = df_mun)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.684 -10.062 -1.104 6.567 59.323
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -19.261431 8.301666 -2.320 0.0217 *
## Alt 0.003873 0.001502 2.579 0.0109 *
## Lat 2.038969 0.354502 5.752 5e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.13 on 146 degrees of freedom
## Multiple R-squared: 0.1922, Adjusted R-squared: 0.1811
## F-statistic: 17.37 on 2 and 146 DF, p-value: 1.712e-07
##
## Call:
## lm(formula = Deaths_ht ~ scale(Alt) + scale(Lat), data = df_mun)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.684 -10.062 -1.104 6.567 59.323
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 28.988 1.322 21.932 <2e-16 ***
## scale(Alt) 3.515 1.363 2.579 0.0109 *
## scale(Lat) 7.839 1.363 5.752 5e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.13 on 146 degrees of freedom
## Multiple R-squared: 0.1922, Adjusted R-squared: 0.1811
## F-statistic: 17.37 on 2 and 146 DF, p-value: 1.712e-07
## Alt Lat
## 1.06 1.06
Response variable = Deaths per 100,000
Explanatory variables = Altitude, Latitude, nmol < 30
##
## Call:
## lm(formula = Deaths_ht ~ Alt + Lat + nmol_30, data = df_mun)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.308 -9.256 -1.324 7.033 56.424
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -14.954767 8.242257 -1.814 0.07168 .
## Alt 0.002704 0.001521 1.778 0.07758 .
## Lat 1.775510 0.358072 4.959 1.96e-06 ***
## nmol_30 88.748859 30.976930 2.865 0.00479 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.75 on 145 degrees of freedom
## Multiple R-squared: 0.2355, Adjusted R-squared: 0.2197
## F-statistic: 14.89 on 3 and 145 DF, p-value: 1.683e-08
##
## Call:
## lm(formula = Deaths_ht ~ scale(Alt) + scale(Lat) + scale(nmol_30),
## data = df_mun)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.308 -9.256 -1.324 7.033 56.424
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 28.988 1.290 22.467 < 2e-16 ***
## scale(Alt) 2.455 1.381 1.778 0.07758 .
## scale(Lat) 6.826 1.377 4.959 1.96e-06 ***
## scale(nmol_30) 3.926 1.370 2.865 0.00479 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.75 on 145 degrees of freedom
## Multiple R-squared: 0.2355, Adjusted R-squared: 0.2197
## F-statistic: 14.89 on 3 and 145 DF, p-value: 1.683e-08
## Alt Lat nmol_30
## 1.14 1.13 1.12
Response variable = Deaths per 100,000
Explanatory variables = Altitude, Latitude, nmol < 30, ethnicity
##
## Call:
## lm(formula = Deaths_ht ~ Alt + Lat + nmol_30 + Ethnicity, data = df_mun)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.970 -8.453 -1.360 6.921 56.281
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -11.752762 11.479530 -1.024 0.307646
## Alt 0.002520 0.001593 1.582 0.115843
## Lat 1.675417 0.436992 3.834 0.000188 ***
## nmol_30 88.968012 31.071660 2.863 0.004819 **
## Ethnicity -0.043904 0.109218 -0.402 0.688293
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.8 on 144 degrees of freedom
## Multiple R-squared: 0.2363, Adjusted R-squared: 0.2151
## F-statistic: 11.14 on 4 and 144 DF, p-value: 6.682e-08
##
## Call:
## lm(formula = Deaths_ht ~ scale(Alt) + scale(Lat) + scale(nmol_30) +
## scale(Ethnicity), data = df_mun)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.970 -8.453 -1.360 6.921 56.281
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 28.9878 1.2940 22.402 < 2e-16 ***
## scale(Alt) 2.2877 1.4461 1.582 0.115843
## scale(Lat) 6.4415 1.6801 3.834 0.000188 ***
## scale(nmol_30) 3.9355 1.3744 2.863 0.004819 **
## scale(Ethnicity) -0.6455 1.6058 -0.402 0.688293
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.8 on 144 degrees of freedom
## Multiple R-squared: 0.2363, Adjusted R-squared: 0.2151
## F-statistic: 11.14 on 4 and 144 DF, p-value: 6.682e-08
## Alt Lat nmol_30 Ethnicity
## 1.24 1.67 1.12 1.53
Using only women > 60 dataset
Response variable = Deaths per 100,000
Explanatory variables = Altitude, Latitude
##
## Call:
## lm(formula = Deaths_ht ~ Alt + Lat, data = df_mun_60)
##
## Residuals:
## 1 2 3 4 5 6 7
## 107.21 -124.92 195.27 -179.42 243.27 -72.88 -168.52
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.417e+03 1.037e+03 -2.332 0.0801 .
## Alt -7.699e-02 1.110e-01 -0.694 0.5260
## Lat 1.552e+02 5.339e+01 2.908 0.0438 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 218.1 on 4 degrees of freedom
## Multiple R-squared: 0.7031, Adjusted R-squared: 0.5547
## F-statistic: 4.737 on 2 and 4 DF, p-value: 0.08814
##
## Call:
## lm(formula = Deaths_ht ~ scale(Alt) + scale(Lat), data = df_mun_60)
##
## Residuals:
## 1 2 3 4 5 6 7
## 107.21 -124.92 195.27 -179.42 243.27 -72.88 -168.52
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 667.64 82.44 8.098 0.00126 **
## scale(Alt) -72.98 105.20 -0.694 0.52604
## scale(Lat) 305.89 105.20 2.908 0.04378 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 218.1 on 4 degrees of freedom
## Multiple R-squared: 0.7031, Adjusted R-squared: 0.5547
## F-statistic: 4.737 on 2 and 4 DF, p-value: 0.08814